<template>
  <view class="ai-index">
    <view class="header">
      <view class="title">智能客服</view>
    </view>
    
    <view class="content">
      <view class="ai-card" @tap="navigateToChat">
        <view class="ai-icon">
          <image src="http://121.36.197.175:19000/test/ai-icon.png" mode="aspectFit"></image>
        </view>
        <view class="ai-info">
          <view class="ai-title">智能农场助手</view>
          <view class="ai-desc">解答您关于智慧农场的各种问题</view>
        </view>
        <view class="ai-arrow">
          <text class="arrow-icon">></text>
        </view>
      </view>
      
      <view class="feature-list">
        <view class="feature-item">
          <view class="feature-icon">
            <image src="http://121.36.197.175:19000/test/feature-icon1.jpg" mode="aspectFit"></image>
          </view>
          <view class="feature-info">
            <view class="feature-title">农场知识问答</view>
            <view class="feature-desc">解答您关于农场种植、养殖的各种问题</view>
          </view>
        </view>
        
        <view class="feature-item">
          <view class="feature-icon">
            <image src="http://121.36.197.175:19000/test/feature-icon2.jpg" mode="aspectFit"></image>
          </view>
          <view class="feature-info">
            <view class="feature-title">认养指导</view>
            <view class="feature-desc">提供认养流程和管理建议</view>
          </view>
        </view>
        
        <view class="feature-item">
          <view class="feature-icon">
            <image src="http://121.36.197.175:19000/test/feature-icon3.jpg" mode="aspectFit"></image>
          </view>
          <view class="feature-info">
            <view class="feature-title">农产品知识</view>
            <view class="feature-desc">了解各类农产品的特性和价值</view>
          </view>
        </view>
      </view>
    </view>
    
    <view class="footer">
      <button class="chat-btn" @tap="navigateToChat">开始对话</button>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {};
  },
  methods: {
    navigateToChat() {
      uni.navigateTo({
        url: '/pages/Intelligent/AiView'
      });
    }
  }
};
</script>

<style lang="scss">
.ai-index {
  min-height: 100vh;
  background-color: #f8f9fa;
  display: flex;
  flex-direction: column;
  
  .header {
    background: linear-gradient(135deg, #34c759, #32ade6);
    padding: 20px;
    color: #fff;
    
    .title {
      font-size: 20px;
      font-weight: bold;
      text-align: center;
    }
  }
  
  .content {
    flex: 1;
    padding: 20px;
    
    .ai-card {
      background: #fff;
      border-radius: 12px;
      padding: 20px;
      display: flex;
      align-items: center;
      margin-bottom: 25px;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
      
      .ai-icon {
        width: 60px;
        height: 60px;
        border-radius: 30px;
        background: linear-gradient(135deg, #34c759, #32ade6);
        display: flex;
        justify-content: center;
        align-items: center;
        margin-right: 15px;
        
        image {
          width: 40px;
          height: 40px;
        }
      }
      
      .ai-info {
        flex: 1;
        
        .ai-title {
          font-size: 18px;
          font-weight: 500;
          margin-bottom: 5px;
        }
        
        .ai-desc {
          font-size: 14px;
          color: #666;
        }
      }
      
      .ai-arrow {
        width: 30px;
        height: 30px;
        display: flex;
        justify-content: center;
        align-items: center;
        
        .arrow-icon {
          font-size: 18px;
          color: #999;
        }
      }
    }
    
    .feature-list {
      .feature-item {
        background: #fff;
        border-radius: 12px;
        padding: 15px;
        display: flex;
        align-items: center;
        margin-bottom: 15px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
        
        .feature-icon {
          width: 40px;
          height: 40px;
          border-radius: 20px;
          background: #f0f7ff;
          display: flex;
          justify-content: center;
          align-items: center;
          margin-right: 15px;
          
          image {
            width: 24px;
            height: 24px;
          }
        }
        
        .feature-info {
          flex: 1;
          
          .feature-title {
            font-size: 16px;
            font-weight: 500;
            margin-bottom: 3px;
          }
          
          .feature-desc {
            font-size: 13px;
            color: #666;
          }
        }
      }
    }
  }
  
  .footer {
    padding: 20px;
    
    .chat-btn {
      background: linear-gradient(135deg, #34c759, #32ade6);
      color: #fff;
      border-radius: 25px;
      font-size: 16px;
      padding: 12px 0;
      font-weight: 500;
      box-shadow: 0 4px 10px rgba(50, 173, 230, 0.3);
      
      &:active {
        transform: scale(0.98);
      }
    }
  }
}
</style> 